import Main from '../pages/Main.vue'

/**
 *
 * @type {RouteRecordRaw[]}
 */
const routes = [
    {
        name: 'Main',
        path: '/',
        component: Main, // 需要在父页面添加 <router-view /> 来显示子路由页面
        // 配置子路由
        children: [
            {
                name: 'All',
                path: '/',
                component: () => import('../pages/All.vue'),
            },
            {
                name: 'Histories',
                path: '/histories',
                component: () => import('../pages/All.vue'),
            },
            {
                name: 'Pictures',
                path: '/pictures',
                component: () => import('../pages/Pictures.vue'),
            },
            {
                name: 'Documents',
                path: '/documents',
                component: () => import('../pages/Documents.vue'),
            },
            {
                name: 'Videos',
                path: '/videos',
                component: () => import('../pages/Videos.vue'),
            }
        ]
    },
    {
        name: 'Reg',
        path: '/reg',
        component: () => import('../pages/Reg.vue')
    },
    {
        name: 'Forget',
        path: '/forget',
        component: () => import('../pages/Forget.vue')
    },
    {
        name: 'Login',
        path: '/login',
        component: () => import('../pages/Login.vue')
    },
    {
        name: 'Share',
        path: '/s/:id', // 动态路由
        component: () => import('../pages/Share.vue')
    }
];
export default routes